<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/24
 * Time: 16:52
 */
class teacher
{
   public $name;
    public $gender;
    public $age;
    function __construct($name,$gender,$weight)
    {

        $this->name = $name;
        $this->gender = $gender;
        $this->weight = $weight;
        echo "进入了".__CLASS__."的构造方法";
    }


    //吃东西
    function eat(){
        echo "{$this->name}正在吃东西";
    }

    //睡觉:
    function sleep(){
        echo "{$this->name}睡觉了...";
    }
}